import logging
import unittest,time
from selenium import webdriver
from po_126mail.Page.Page1 import Page1
from po_126mail.Page.Page2 import Page2
from po_126mail.Tools.Toos import Tools

class TestCase(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Firefox()
        Tools().log2()

    def tearDown(self):
        time.sleep(3)
        self.driver.quit()

    def test_01(self):
        po = Page1(self.driver)
        po.login_01()

    def test_02(self):
        logging.info('start case')
        po = Page2(self.driver)
        po.login_01()
        po.writer()
        po.person()
        time.sleep(1)
        po.title()
        time.sleep(1)
        po.kj2()
        po.message()
        time.sleep(1)
        po.iframe_content()
        po.send()
        logging.info('case end')